package LibDL.recommender.example;

import net.librec.common.LibrecException;
import net.librec.conf.Configuration;
import net.librec.job.RecommenderJob;

import java.io.IOException;

public class BPRExample extends BaseLibDLRecExample {

    static {
        System.load(System.getProperty("user.dir") + "/../target/libLibDL.core.so");
    }

    @Override
    public void run() throws LibrecException, IOException, ClassNotFoundException {
        setup();
        Configuration.Resource resource = new Configuration.Resource("rec/bpr.properties");
        conf.addResource(resource);
        RecommenderJob job = new RecommenderJob(conf);
        job.runJob();
    }

    public static void main(String[] args) throws LibrecException, IOException, ClassNotFoundException {
        BPRExample example = new BPRExample();
        example.run();
    }
}
